package java8.test;

import java8.test.data.Person;

public class Learning02 {

    public static void main(String[] args) {

        Person01 person01 = () -> new Person();
        person01.getPerson();

        //构造方法的引用
        Person01 person011 = Person::new;
        Person p1 = person011.getPerson();

        Person02 person02 = Person::new;
        Person p2 = person02.getPerson("张三", 22);

    }

}

interface Person01{
    Person getPerson();
}

interface Person02{
    Person getPerson(String name, Integer age);
}
